package com.ruoyi.voucher.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.voucher.mapper.VoucherDetailsMapper;
import com.ruoyi.voucher.domain.VoucherDetails;
import com.ruoyi.voucher.service.IVoucherDetailsService;

/**
 * 凭证详情Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-21
 */
@Service
public class VoucherDetailsServiceImpl extends ServiceImpl<VoucherDetailsMapper,VoucherDetails> implements IVoucherDetailsService
{
    @Autowired
    private VoucherDetailsMapper voucherDetailsMapper;

    /**
     * 查询凭证详情
     * 
     * @param id 凭证详情主键
     * @return 凭证详情
     */
    @Override
    public VoucherDetails selectVoucherDetailsById(Long id)
    {
        return voucherDetailsMapper.selectVoucherDetailsById(id);
    }

    /**
     * 查询凭证详情列表
     * 
     * @param voucherDetails 凭证详情
     * @return 凭证详情
     */
    @Override
    public List<VoucherDetails> selectVoucherDetailsList(VoucherDetails voucherDetails)
    {
        return voucherDetailsMapper.selectVoucherDetailsList(voucherDetails);
    }

    /**
     * 新增凭证详情
     * 
     * @param voucherDetails 凭证详情
     * @return 结果
     */
    @Override
    public int insertVoucherDetails(VoucherDetails voucherDetails)
    {
        return voucherDetailsMapper.insertVoucherDetails(voucherDetails);
    }

    /**
     * 修改凭证详情
     * 
     * @param voucherDetails 凭证详情
     * @return 结果
     */
    @Override
    public int updateVoucherDetails(VoucherDetails voucherDetails)
    {
        return voucherDetailsMapper.updateVoucherDetails(voucherDetails);
    }

    /**
     * 批量删除凭证详情
     * 
     * @param ids 需要删除的凭证详情主键
     * @return 结果
     */
    @Override
    public int deleteVoucherDetailsByIds(Long[] ids)
    {
        return voucherDetailsMapper.deleteVoucherDetailsByIds(ids);
    }

    /**
     * 删除凭证详情信息
     * 
     * @param id 凭证详情主键
     * @return 结果
     */
    @Override
    public int deleteVoucherDetailsById(Long id)
    {
        return voucherDetailsMapper.deleteVoucherDetailsById(id);
    }
}
